<!DOCTYPE html>
<html class="no-js">
<head>
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <meta name="description" content=""/>
    <meta name="keywords" content=""/>
    <meta name="viewport"
          content="width=device-width, initial-scale=1"/>
    <title>推荐</title>

    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit"/>

    <!-- No Baidu Siteapp-->
    <meta http-equiv="Cache-Control" content="no-siteapp"/>

    <link rel="icon" type="image/png" href="assets/i/favicon.png"/>

    <!-- Add to homescreen for Chrome on Android -->
    <meta name="mobile-web-app-capable" content="yes"/>
    <link rel="icon" sizes="192x192" href="assets/i/app-icon72x72@2x.png"/>

    <!-- Add to homescreen for Safari on iOS -->
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png"/>

    <!-- Tile icon for Win8 (144x144 + tile color) -->
    <meta name="msapplication-TileImage" content="assets/i/app-icon72x72@2x.png"/>
    <meta name="msapplication-TileColor" content="#0e90d2"/>

    <link rel="stylesheet" href="assets/css/amazeui.min.css"/>
    <link rel="stylesheet" href="assets/css/app.css"/>
</head>
<body>
        <div class="am-slider am-slider-default" data-am-flexslider="true" id="demo-slider-0">
            <ul class="am-slides" id="myul">
                <!--<li><img src="http://s.amazeui.org/media/i/demos/bing-1.jpg" /></li>-->
                <!--<li><img src="http://s.amazeui.org/media/i/demos/bing-2.jpg" /></li>-->
            </ul>
        </div>

<!--在这里编写你的代码-->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/amazeui.min.js"></script>
<script>

    $.ajax({
        type: "GET",
        url: "/movie/get?count=3",
        timeout: 20000,
        success: function(result) {
            console.log(result);
//            var resultObj = jQuery.parseJSON(result);
            for(var obj in result.data.content){
                console.log(obj);
                var element = '<li><img src="' + result.data.content[obj].image +'" /></li>'
                var $slider = $('#demo-slider-0');
                $('#myul').append(element);
            }
            $('.am-slider').flexslider();
        },
        error: function(XMLHttpRequest, textStatus, errorThrown) {
            console.log(XMLHttpRequest.status);
            alert('失败');
            return
        }
    });

</script>
</body>
</html>